package com.ruoyi.datastatistics.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.datastatistics.domain.DosageTrendData;
import com.ruoyi.datastatistics.domain.TerminalHistoryData;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 小-历史数据Mapper接口
 *
 * @author ruoyi
 * @date 2023-09-06
 */
public interface TerminalDbStatisticAnalysisMapper extends BaseMapper<TerminalHistoryData>
{

    //根据location_nb和时间获取历史数据
    List<TerminalHistoryData> getTerminalDbHistory(@Param(value = "location_nb") String location_nb,
                                                   @Param(value = "startTime")String startTime,
                                                   @Param(value = "endTime")String endTime);



    List<DosageTrendData> getDataTrendHour(@Param(value = "location_nb") String location_nb,
                                           @Param(value = "interval")String interval,
                                           @Param(value = "startTime")String startTime,
                                           @Param(value = "endTime")String endTime);



    List<DosageTrendData> getDataTrendDay(@Param(value = "location_nb") String location_nb,
                                         @Param(value = "startTime")String startTime,
                                         @Param(value = "endTime")String endTime);


    List<DosageTrendData> getDataTrendMonth(@Param(value = "location_nb") String location_nb,
                                             @Param(value = "startTime")String startTime,
                                             @Param(value = "endTime")String endTime);
}
